package com.jt.dao;

import com.jt.pojo.User;
import org.springframework.stereotype.Repository;

@Repository
public class UserMapperImpl implements UserMapper {

    private String className;
    private String methodName;

    @Override
    public void addUser(User user){
        System.out.println("用户入库:"+user);
        className = Thread.currentThread().getStackTrace()[1].getClassName();
        methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        System.out.println("当前执行的类名 " + className);
        System.out.println("当前执行的方法名 " + methodName);
    }
    @Override
    public void deleteUser(User user) {
        System.out.println("删除用户：" + user);
    }
}
